package com.dimong.www.loan.ui.adapter.holder;


import android.content.Context;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.dimong.loan.sdk.ui.adapter.BaseRecyclerViewHolder;
import com.dimong.www.loan.R;
import com.dimong.www.loan.db.CheckModel;
import com.dimong.www.loan.db.CheckTotalModel;

import cn.qqtheme.framework.util.DateUtils;

public class CheckHeadHolder extends BaseRecyclerViewHolder {
    private TextView time;
    private TextView money;

    public CheckHeadHolder(Context context, ViewGroup parent) {
        super(context, R.layout.item_check_head, parent);
        time = itemView.findViewById(R.id.time);
        money = findViewById(R.id.money);
    }

    @Override
    public void setData(Object object) {
        super.setData(object);
        if (object instanceof CheckTotalModel) {
            CheckTotalModel checkTotalModel = (CheckTotalModel) object;
            time.setText(checkTotalModel.getYear()+"-"+DateUtils.fillZero(checkTotalModel.getMonth())+"-"+DateUtils.fillZero(checkTotalModel.getDay()));
            money.setText(checkTotalModel.getMoney() + "");
        }

    }
}
